package com.myteam.fugaocrm.sqldb.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.myteam.fugaocrm.modle.FgPartnerCompany;
import com.myteam.fugaocrm.modle.FgUser;

/**
 * 供应商公司Mapper
 * @author BZX
 */
public interface FgPartnerCompanyMapper {
	/** 查询全部供应商公司 */
	@Select("SELECT * FROM fg_partner_company WHERE is_delete = 0")
	public List<FgPartnerCompany> all();
	
	/** 删除一个供应商公司 */
	@Select("update fg_partner_company set is_delete = 1 where partner_company_id = #{partnerCompanyId}")
	public void deleteOne(@Param("partnerCompanyId") Integer partnerCompanyId);
	
	/** 新增一个供应商公司 */
	@Select("insert into fg_partner_company(partner_company_name,created_date,created_user) values(#{partnerCompanyName},#{createdDate},#{createdUser})")
	public void insert(Map<String, Object> params);
	
	/** 修改一个供应商公司 */
	@Select("update fg_partner_company set partner_company_name=#{partnerCompanyName},modified_user=#{modifiedUser},modified_date=#{modifiedDate} where partner_company_id = #{partnerCompanyId}")
	public void update(Map<String, Object> params);
}
